#pragma once

#include <QDockWidget>
#include <QToolBox>
#include "particledefine.h"

namespace ParticleEditor
{
	class LayersBrowser;
	class CounterWidget;
	class ParticleBaseWidget;
	class TexturePreviewWidget;
	class ColorSettingWidget;
	class EmitterSettingWidget;
	class PlacerSettingWidget;
	class ShooterSettingWidget;
	class ProgramWidget;

	class ParameterDockWidget:public QDockWidget
	{
		Q_OBJECT
	public:
		ParameterDockWidget(QWidget* parent = 0,Qt::WindowFlags flags = 0);
		~ParameterDockWidget();

		void initLayersList(ParticleSystem* ps);
		void copyLayer();
	private slots:
		void slotsSelectLayerChanged(ParticleSystemLayer psl);
		void slotsAddItem(const QString& title,QWidget* w);
		void slotsToggleLayer(ParticleSystemLayer);
	private:
		void initGui();
		void disableToolBox(bool);
		QToolBox*													_toolBox;
		CounterWidget*												_counterWidget;
		LayersBrowser*												_layersBrowser;
		ParticleBaseWidget*											_particleBaseWidget;
		TexturePreviewWidget*										_texturePreviewWidget;
		ColorSettingWidget*											_colorSettingWidget;
		EmitterSettingWidget*										_emitterSettingWidget;
		PlacerSettingWidget*										_placerSettingWidget;
		ShooterSettingWidget*										_shooterSettingWidget;
		ProgramWidget*												_programWidget;
	signals:
		void signalsSelectLayerChanged(ParticleSystemLayer psl);
		void signalsToggleLayer(ParticleSystemLayer);
	};
}